
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>发布文章</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="../res/layui/css/layui.css">
  <link rel="stylesheet" href="../res/static/css/index.css">
</head>
<body class="bgcolor" style="padding: 0 50px;">

  <div class="layui-form" id="newsPush-iframe">
    <input type="text" required lay-verify="required" placeholder="请输入标题，1-60个字" class="layui-input">
    <textarea lay-verify="required"  placeholder="请输入内容" class="layui-textarea"></textarea>
    <div class="img"><i id="uploadImg" class="layui-icon layui-icon-news-img"></i></div>
    <p>支持绝大多数的图片格式，单张图片大小不超过10M，请勿上传倒退黄色等违法图片。</p>
    <button class="layui-btn" lay-submit lay-filter="publishNews">发表</button>
  </div>

<script src="../res/layui/layui.js"></script>
<script>
  layui.config({
    base: '../res/static/js/' 
  }).use(['news', 'upload'], function(){
    var upload = layui.upload;
    upload.render({
      elem: '#uploadImg'
      ,url: 'json/pushimg.js'
      ,accept: 'images'
      ,method: 'get'
      ,acceptMime: 'image/*'
      ,done: function(res){       
      }
    });
  }); 
</script>

</body>
</html>